/**
 * 
 */
package org.t2.game.server.module.rank.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * 
 */
public enum RankType {
	LEVEL(1, "等级排行"),
	MISSION(2, "关卡排行"),
	DUNGEON(3, "副本排行"),
	RECHARGE(4, "充值排行"),
	GOLD_DUNGEON(5, "金币副本排行"),
	DIAMOND_DUNGEON(6, "钻石副本排行"),
	
	;
	public static Map<Integer, RankType> codes = new HashMap<>();
	static {
		for (RankType rankType : RankType.values()) {
			codes.put(rankType.value, rankType);
		}
	}
	public static RankType valueOf(int code) {
		return codes.get(code);
	}
	
    private final int value;
    private final String desc;

    private RankType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

	public int getValue() {
		return value;
	}

	public String getDesc() {
		return desc;
	}
}
